package java56_4;

public class StuTest2 {

	public static void main(String[] args) {

		// Student[] ar = new Student[30];
		// ar[0] = new Student();
		// ar[0].name = "代逸飞";
		// ar[0].age = 22;
		// Student s1 = new Student();
		// s1.name = "王标";
		// s1.age = 23;
		// ar[1] = s1;
		//
		// for (int i = 0; i < ar.length; i++) {
		// // System.out.println(ar[i]);
		// if (ar[i] != null)
		// ar[i].show();
		// }
		// System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>");
		// Student[] a2 = { new Student(), new Student(), new Student() };
		// for (Student s : a2)
		// s.show();
		Student s1 = new Student();
		s1.name = "王标";
		s1.age = 23;
		s1.javaScore = 56;
		Student s2 = new Student();
		s2.name = "li标";
		s2.age = 13;
		s2.javaScore = 50;
		Student s3 = new Student();
		s3.name = "张标";
		s3.age = 25;
		s3.javaScore = 55;
		Student[] ar = new Student[3];
		ar[0] = s1;
		ar[1] = s2;
		ar[2] = s3;
		for (int i = 0; i < ar.length; i++) {
			if (ar[i] != null)
				ar[i].show();
		}
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
		Calc c = new Calc();
		c.zhangfen(ar);

		for (int i = 0; i < ar.length; i++) {
			if (ar[i] != null)
				ar[i].show();
		}
	}
}
